//
//  RootViewController.m
//  Doc Bao
//
//  Created by Hai Nguyen on 9/16/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "RootViewController.h"
#import "NewsTabBarController.h"

@implementation RootViewController
@synthesize mainNavController;
@synthesize tabBarController;

- (void) viewDidLoad{
	[super viewDidLoad];
	self.tabBarController = [[[NewsTabBarController alloc] init] autorelease];
	[self.view addSubview:tabBarController.view];
	[self.tabBarController.view setFrame:CGRectMake(0, self.view.frame.size.height-self.tabBarController.view.frame.size.height, self.view.frame.size.width, self.tabBarController.view.frame.size.height)];
  [self.view addSubview:self.mainNavController.view];
	[self.mainNavController.view setFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height-self.tabBarController.view.frame.size.height)];
}

- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc. that aren't in use.
}

- (void)viewDidUnload {
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
	self.mainNavController = nil;
	self.tabBarController = nil;
}

- (void)dealloc {
	self.mainNavController = nil;
	self.tabBarController = nil;
    [super dealloc];
}

@end
